<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>拍卖网</title>

    <link rel="stylesheet" href="/themes/front/index_files/common.css">
    <link rel="stylesheet" href="/themes/front/index_files/auction.css">
    <link rel="stylesheet" href="/themes/front/detail_picture_show.css">
</head>
<body>
<#include "include/top.html"/>
<div class="content_bak">
    <div class="content">
        <div class="detail_top_basic">
            <div class="ymi_detail">
                <div class="detail_box">
                    <div class="tb-booth tb-pic tb-s310">
                        <a href="#"><img src="${product.img}"
                                         class="jqzoom" style="cursor: crosshair;"></a>
                    </div>
                </div>
            </div>
            <div class="detail_top_basic_r">
                <dl class="title">
                    <dt title="${product.name}">${product.name}</dt>
                    <dd>
                        <span>发布时间：${product.addtime?string('yyyy-MM-dd HH:mm:ss')}</span>
                    </dd>
                </dl>
                <div style="float: left;width:420px;margin-top: 10px;">
                    <div class="detail_r_price">
                        <div class="y_price">起拍价：<b><font style="font-size:14px;">RMB</font>&nbsp;${product.price}</b>
                        </div>
                        <div class="see_y">加价单位：${product.range}</div>
                    </div>
                    <br/>
                    <div class="detail_r_zgj">
                        <span style="width:190px;">当前价：<i>RMB&nbsp;${product.current}</i></span>
                        <span style="width:230px;">出价：<em>${product.count!0}</em>次</span>
                    </div>
                    <div class="detail_r_daojishi lxftime">
                        <em></em>结束时间：${product.endtime?string('yyyy-MM-dd HH:mm:ss')}
                    </div>
                    <p style="width: 420px;height:40px;line-height: 40px;color:#777;float:left">
                        注意：倒计时可能存在误差，请及时&nbsp;&nbsp;<a href="/product/${product.id}" class="red">刷新</a>
                    </p>
                </div>
                <div class="jp_wxts" style="margin-top: 10px;">
                    <div class="jp_wxts_title">温馨提示</div>
                    <ul>
                        <li>佛像，珊瑚，象牙，高额金银珠宝制品，燃气灶，热水器，音响，喇叭，刀具，打火机，电池，精密仪器，药品，高压气体，酒水，易燃易爆品，汽车摩托车配件，动植物等以及其他一切<a
                                style="color: #f33066;" href="http://www.ymi.cn/articleitem-227.html" target="_blank">国家禁止入境的商品</a>，无法运输，其中给您造成的损失洋觅网不予承担；
                        </li>
                        <li>如因您购买了重量或者体积超出邮局规定的商品而造成无法邮寄的损失，洋觅网概不承担，详情请参考<a style="color: #f33066;"
                                                                            href="http://www.ymi.cn/articleitem-228.html"
                                                                            target="_blank">邮局运输标准</a>；
                        </li>
                        <li>竞拍成功的商品一律不接受以任何形式的原因而造成的弃标，一旦发生弃标行为，洋觅网将扣除该商品金额的30%~50%+53元服务费作为弃标费。</li>
                        <li>商品名中出现<span style="color: #f33066;">“垃圾”</span>、<span style="color: #f33066;">“出租”</span>、商品详情不完整、卖家整体信誉过低的商品，不建议竞拍。具体详情请咨询小觅在线客服。
                        </li>
                    </ul>
                </div>
                <div class="buy_button">
                <#if product.status == '拍卖中'>
                    <button class="buy_now" onclick="chujia()">出价</button>
                <#else>
                    <button onclick="alert('${product.status}')" class="buy_now"
                            style="background: #cccccc;">${product.status}</button>
                </#if>

                    <button class="buy_now" onclick="comment();" style="margin-left: 66px;background: #F3981C;">评论
                    </button>
                </div>
            </div>
        </div>
        <div class="message_basic">


            <div class="goods_detail">
                <div class="tab_menu">
                    <a href="javascript:void(0)" id="xq" class="selected">商品详情</a>
                    <a href="javascript:void(0)" id="jl" class="">下标记录</a>
                    <a href="javascript:void(0)" id="pl" class="">商品评论</a>
                </div>
                <div class="goods_detail_con">
                    <div class="goods_detail_one" id="goods_detail_one3"
                         style="display: block; text-align: left; overflow: hidden;">
                        <div style="float: left;width: 1000px;height: 70px;margin-left: 60px;line-height: 50px;font-size: 18px;color:#e31436;">
                        ${product.content!}
                        </div>
                    </div>
                    <div class="goods_detail_one" id="goods_detail_one4" style="display: none;">
                        <table cellpadding="0" cellspacing="0" width="100%">
                            <tbody>
                            <tr bgcolor="#f5f5f5">
                                <th width="20%" height="30">出价者</th>
                                <th width="20%" height="30">出价时间</th>
                                <th width="20%" height="30">出价金额</th>
                            </tr>
                            <#list offerList as item>
                            <tr>
                                <td align="center"
                                    style="height:25px; line-height:25px; font-size:14px;">${item.username!}</td>
                                <td align="center"
                                    style="height:25px; line-height:25px; font-size:14px;">${item.addtime?string('yyyy-MM-dd HH:mm:ss')}</td>
                                <td align="center"
                                    style="height:25px; line-height:25px; font-size:14px;">${item.price!}</td>
                            </tr>
                            </#list>
                            </tbody>
                        </table>
                    </div>
                    <div class="goods_detail_one" id="goods_detail_one5" style="display: none;">
                        <table cellpadding="0" cellspacing="0" width="100%">
                            <tbody>
                            <tr bgcolor="#f5f5f5">
                                <th width="20%" height="30">评论人</th>
                                <th width="20%" height="30">评论时间</th>
                                <th width="20%" height="30">评论</th>
                            </tr>
                            <#list commentList as item>
                            <tr>
                                <td align="center"
                                    style="height:25px; line-height:25px; font-size:14px;">${item.username}</td>
                                <td align="center"
                                    style="height:25px; line-height:25px; font-size:14px;">${item.addtime?string('yyyy-MM-dd HH:mm:ss')}</td>
                                <td align="center"
                                    style="height:25px; line-height:25px; font-size:14px;">${item.content!}</td>
                            </tr>
                            </#list>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>


<!-- *************出价竞拍*********start -->
<div class="login_backs"></div>
<div class="aloginBox" id="chuj">
    <div class="alogin_colse"><h3>出价竞拍</h3><span></span></div>
    <div class="alogin_con">
        <form method="post" action="/offer/send" id="f1">
            <input type="hidden" name="productid" value="${product.id}">
            <div class="pricedescription">
            <span class="lt"
                  style="width:100px;">本&nbsp;&nbsp;&nbsp;品&nbsp;&nbsp;&nbsp;现&nbsp;&nbsp;&nbsp;价：</span><font
                    class="red">${product.current}</font>元<br>
                <span class="lt" style="width:100px;">本次加价至少为：</span><font class="red">${product.range!}</font>元<br>
            </div>
            <div class="ausername">
                <span class="lt" style="width:75px;">出&nbsp;价&nbsp;金&nbsp;额：</span>
                <input type="number" min="${product.current?string("#0")}" step="${product.range?string("#0")}"
                       value="${product.current?string("#0")}" class="outprice" name="price" required>
            </div>
            <div class="ausername">
                <span class="lt" style="width:75px;">&nbsp;</span><input class="bids" style="cursor:pointer;"
                                                                         type="button" onclick="$('#f1').submit()"
                                                                         value="确定">
                <input class="bids" style="cursor:pointer;" type="button" value="取消" onclick="clean()">
            </div>
            <div class="acontents">
                <font class="red">温馨提示：</font>出价成功后不能弃标，弃标要影响个人信用度。
            </div>
        </form>
    </div>
</div>


<div class="aloginBox" id="com">
    <div class="alogin_colse"><h3>发表评论</h3><span></span></div>
    <div class="alogin_con">
        <form method="post" action="/comment/send" id="f2">
            <input type="hidden" name="productid" value="${product.id}">
            <div class="ausername">
                <span class="lt" style="width:75px;">评论：</span>
                <input type="text" class="outprice" name="content" required>
            </div>
            <div class="ausername">
                <span class="lt" style="width:75px;">&nbsp;</span>
                <input class="bids" style="cursor:pointer;" type="button" value="确定" onclick="$('#f2').submit()">
                <input class="bids" style="cursor:pointer;" type="button" value="取消" onclick="clean()">
            </div>

        </form>
    </div>
</div>

<div class="clear"></div>
<script src="/themes/admin/js/jquery-2.0.3.min.js"></script>
<script>
    var time = setTimeout('myrefresh()', 3000);
    $("#xq").click(function () {
        $(".tab_menu a").removeClass("selected");
        $("#xq").addClass("selected");
        $(".goods_detail_one").hide();
        $("#goods_detail_one3").show();
        time = setTimeout('myrefresh()', 3000);
    });

    $("#jl").click(function () {
        clearInterval(time);
        $(".tab_menu a").removeClass("selected");
        $("#jl").addClass("selected");
        $(".goods_detail_one").hide();
        $("#goods_detail_one4").show();

    });

    $("#pl").click(function () {
        clearInterval(time);
        $(".tab_menu a").removeClass("selected");
        $("#pl").addClass("selected");
        $(".goods_detail_one").hide();
        $("#goods_detail_one5").show();
    });

    function myrefresh() {
        window.location.reload();
    }


    function comment() {
    <#if sessionUser??>
        clearInterval(time);
        $(".login_backs").show();
        $("#com").show();
    <#else>
        location.href = '/login';
    </#if>
    }

    function chujia() {
    <#if sessionUser??>
        <#if err?? && err?length gt 0>
        if (confirm("您需要支付10%的订金才能参与竞拍，确认支付吗？")) {
            location.href = "/offer/pay/${product.id}";
        }
        <#else>
       clearInterval(time);
        $(".login_backs").show();
        $("#chuj").show();
        </#if>
    <#else>
        location.href = '/login';
    </#if>
    }

    function clean() {
        $(".login_backs").hide();
        $("#chuj").hide();
        $("#com").hide();
        time = setTimeout('myrefresh()', 3000);
    }

    var error = "${error!}";
    if (error.length != 0) {
        if (confirm("您需要支付10%的订金才能参与竞拍，确认支付吗？")) {
            location.href = "/offer/pay/${product.id}";
        }
    }


</script>
</body>
</html>